Using Policies with Gateway APIs
To use a policy with your API via APIs, you must:
-
Create a DeployedApiPolicyRule that specifies the rule to use, configuration for the rule, and the HTTP methods of the requests that the rule should be applied to. After you have created a
DeployedAPIPolicyRuleyou can modify, delete, or query it.noteThe
DeployedApiPolicyRuleis not specific to an API. After it is created, it can be assigned to one or more APIs. GraphQL APIs are provided for creatingDeployedApiPolicyRule, querying existingDeployedApiPolicyRules, and assigning aDeployedApiPolicyRuleto a deployment. Each GraphQL request must include a X-Account header, the value of the header is the user’s account identifier. -
Assign the DeployedApiPolicyRule to your API deployed on an API Gateway.